*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
*
*Generated: 2025-11
*
*by Lukas Rudolph
*
*modified: --
*
*Data used: ukr_master_and_vignette_replication_data.dta
*Data output generated: --
*
*Tables generated:  Supplementary Table 4
*Figures generated: Figs. 6, 7, 8; Supplementary Figs. 6, 8, 9, 10
*
*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
*PREPARATION
*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

********************************************************
*prepare Stata 
********************************************************

version 19 

*path
cd "" // set working directory to folder where you upload the replication files
// create subfolders with name "figures" and with name "tables"

*output directories
global fig = "figures"
global tab = "tables"

*install necessary third-party packages if not already installed
*findit estout      // by Ben Jann
*findit coefplot    // by Ben Jann
*findit grstyle     // by Ben Jann
*findit palettes     // by Ben Jann
*findit colrspace     // by Ben Jann

*define grstyle for nice layout
set scheme s2color   
grstyle init
grstyle set imesh
grstyle set symbol
grstyle set legend, nobox

*load data
use "ukr_master_and_vignette_replication_data", clear

********************************************************
*some recoding
********************************************************

recode  Q13n_1_1 (977=.a), 

gen land = Country
label define country 1 "Germany" 2 "Italy" 3 "UK" 4 "France" 5 "US"
label values country country

gen vign = Vignette_show
*long labels for Fig. 6
label define vign 1 "air defence" 2 "air defence and tanks" 3 "air defence, tanks and jets" 4 "Western soldiers" 5 "doubling economic aid" 6 "max. sanctions against Russia", replace
label values vign vign 
*short labels for Fig. 7 
label define vign2 1 "air defence" 2 "air def. + tanks" 3 "air def., tanks + jets" 4 "West. soldiers" 5 "doubling econ. aid" 6 "max. Russ. sanctions", replace
label values vign vign2 

*** generate easy-to-loop subgroup indicator for subgroups by pro-/anti-Western-attitudes in Figure 8 and Supplementary Figure 10
gen proantiwestgroups = . 
replace proantiwestgroups = 1 if antiwestern == 1
replace proantiwestgroups = 2 if slight_antiwestern == 1
replace proantiwestgroups = 3 if slight_prowester == 1
replace proantiwestgroups = 4 if prowestern == 1

*** generate and label variables for Suppl. Fig 6

	gen lr11 = round(leftright11)
	label variable lr11 "left (1) to right (11)"
	label variable pro_russia "Understand Russia threatened" 
	label variable anti_us "US imperalism main threat" 
	label variable Q11 "Anti-NATO attitudes"
	
*** generate categorical controls for Suppl. Table 4
recode age (18/30 = 1 "18-30") (31/45 = 2 "31-45") (46/60 = 3 "46-60") (61/120 = 4 "61-100"), gen(agegroups)
recode gender (1=1 "Male") (2=0 "Female"), gen(male)
recode past_turnout (1=1 "Voter") (0=0 "Non-voter"), gen(voter)

*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
*Main article figures and supplementary tables with statistics used for interpretation
*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


***************************************************************************************************
******** Figure 6: Average support for six different types of Ukraine support based on the split-sample aid vignette 
* and corresponding Supplementary Table 14
***************************************************************************************************

label values vign vign
 
 eststo clear

 reg Q13n_1_1 i.vign  , r
eststo all: margins  i.vign  , post

coefplot  all  , aspectratio(.5) base drop(_cons)  xlabel(3(.25)5) label t2title(Support Ukraine with ... (1 (disagree) / 7 (agree))) xline(4)

 graph export "$fig\Fig6.eps", replace  
 
*testing differences
test 1.vign=2.vign
test 1.vign=5.vign
test 2.vign=5.vign
test 3.vign=5.vign

 ** corresponding Supplementary Table 14
 
esttab all    using "$tab\atfig6.tex" /// 
, mtitles nobaselevel cells(b(fmt(4)) p(fmt(4) par) ci(fmt(4) par)) replace label p	stats(N, fmt(%12.0f)) mtitle(support) nostar

***************************************************************************************************
******** Figure 7: Perception of six types of consequences (as indicated in panel header) for six different types of Ukraine support (based on the split-sample aid vignette) relative to vignette level `air defense' as baseline
* and corresponding Supplementary Table 15
***************************************************************************************************

label values vign vign2

eststo clear 

foreach y in 2 3 6 1 4 5 {
eststo model`y': reg q13_2_`y' i.vign , r
}

* create panel 1 
coefplot  model2 , bylabel("higher Ukrainian winning chances") || model3  , bylabel("higher World War 3 risk")   || model6 , bylabel("quicker end to the war") ///
 drop(_cons) xline(0, lpattern(solid))  byopts(style(compact) cols(1) )  xsize(1.3) ysize(1.4) xlabel(-0.75(.25)0.75,  grid) ///
legend(size(small) region(lcolor(white)) order(3 "all") cols(6))  base /// 
name(one, replace) aspectratio(0.5) 

* create panel 2
coefplot   model1  , bylabel("more Ukrain. suffering/destruction") ||  model4  , bylabel("more refugees" ) || model5 , bylabel("domestic econ. disadvantages")      ///
 drop(_cons) xline(0, lpattern(solid))  byopts(style(compact) cols(1) )  xsize(1.3) ysize(1.4) xlabel(-0.75(.25)0.75,  grid) ///
legend(size(small) region(lcolor(white)) order(3 "all") cols(6))  base /// 
name(two, replace)  aspectratio(0.5) 

* combine graphs
graph combine one two, t2title("This support leads to ... (1 (not at all) / 7 (certainly))", size(small)) xcommon

gr_edit .t2title.DragBy -11.95689539211146 0
// top 2 reposition
gr_edit .t2title.DragBy -.3985631797370253 0
// top 2 reposition
gr_edit .t2title.DragBy -.3985631797370565 0
// top 2 reposition
gr_edit .t2title.DragBy -.3985631797370721 0
// top 2 reposition

graph export "$fig\Fig7.eps", replace 

 ** corresponding Supplementary Table 15

esttab model2  model3 model6 model1 model4 model5  ///    using "$tab\atfig7.tex" /// 
, mtitles("higher Ukrainian winning chances" "higher World War 3 risk" "quicker end to the war" "more Ukrain. suffering/destruction" "more refugees"  "domestic econ. disadvantages")   replace label p	stats(N r2) nostar refcat(2.vign "air defense") nobaselevel cells(b(fmt(4)) p(fmt(4) par) ci(fmt(4) par))



***************************************************************************************************
*** Figure 8: Perception of six types of consequences (as indicated in panel header) for six different types of Ukraine support (based on the split-sample aid vignette) by subsample with lowest 25\% and highest 25\% score on anti-Western attitudes (marginal means)
* and corresponding Supplementary Tables 16 and 17
***************************************************************************************************

 
eststo clear 

foreach y in 2 3 6 1 4 5 {
foreach x in 1 4 {
eststo model`y'`x': reg q13_2_`y' i.vign if proantiwestgroups==`x', r
eststo overall`y'`x': margins  i.vign  , post
}
}

 coefplot  (overall21 , pstyle(p2)) (overall24 , pstyle(p1) ) , bylabel("higher Ukrainian winning chance") || overall31 overall34  , bylabel("higher World War 3 risk") ||  overall61 overall64 , bylabel("quicker end to the war")   ///
 drop(_cons) xline(4, lpattern(solid))  byopts(style(compact) cols(1) )  xsize(1) ysize(1.5) xlabel(3(.5)5.5,  grid) ///
legend(size(small) region(lcolor(white)) order(2 "Strong anti−Western attitudes (Quartile 4) " /// 6 "Strong pro−Western attitudes (Quartile 1)"  
) cols(4))  base /// 
name(one, replace) aspectratio(0.5)


coefplot  (overall11 , pstyle(p2)) (overall14, pstyle(p1)) , bylabel("more Ukrain. suffering/destruction") ||  overall41 overall44  , bylabel("more refugees" ) || overall51 overall54 , bylabel("domestic econ. disadvantages")    ///
 drop(_cons) xline(4, lpattern(solid))  byopts(style(compact) cols(1) )  xsize(1) ysize(1.5) xlabel(3(.5)5.5,  grid) ///
legend(size(small) region(lcolor(white)) order( /// 3 "Strong anti−Western attitudes (Quartile 4) " 
4 "Strong pro−Western attitudes (Quartile 1)"  ) cols(4))  base /// 
name(two, replace) aspectratio(0.5)

graph combine one two, t2title("This support leads to... (1 (not at all) / 7 (certainly))", size(small))

gr_edit .plotregion1.graph1.legend.plotregion1.label.DragBy 0 14 // .54396400974488
// label reposition
gr_edit .plotregion1.graph1.legend.plotregion1.key.DragBy 0 14.5 // .94252718948191
// key reposition
gr_edit .plotregion1.graph2.legend.plotregion1.key.DragBy 0 -8 // 166953133952088
// key reposition
gr_edit .plotregion1.graph2.legend.plotregion1.label.DragBy 0 -7.5 // 369826774477998
// label reposition
// gr_edit .plotregion1.graph2.legend.plotregion1.label.DragBy 0 -.3985631797370253
// label reposition
// gr_edit .plotregion1.graph2.legend.plotregion1.label.DragBy 0 -.3985631797370722
// label reposition
gr_edit .t2title.DragBy -9.166953133952127 0
// top 2 reposition
gr_edit .t2title.DragBy -.3985631797370721 0
// top 2 reposition 
 graph export "$fig\Fig8.eps", replace 
  graph export "$fig\Fig8.pdf", replace 

  ** corresponding Supplementary Table 16

 esttab overall21 overall24   overall31 overall34 overall61 overall64 overall11 overall14 overall41 overall44 overall51 overall54 /// using "$tab\atfig8.tex" /// 
, mgroups("higher Ukrainian winning chances" "higher World War 3 risk" "quicker end to the war" "more Ukrain. suffering/destruction" "more refugees"  "domestic econ. disadvantages", pattern(1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0) ///
prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span})) nobaselevel replace label se	stats(N, fmt(%12.0f)) cells(b(fmt(4)) p(fmt(4) par) ci(fmt(4) par)) p nostar ///
mtitles("anti-West." "pro-West." "anti-West." "pro-West." "anti-West." "pro-West." "anti-West." "pro-West." "anti-West." "pro-West." "anti-West." "pro-West." )

** corresponding Supplementary Table 17 for interpretation of changes
 esttab model21 model24   model31 model34 model61 model64 model11 model14 model41 model44 model51 model54  ///  using "$tab\atfig8changes.tex" /// 
, mgroups("higher Ukrainian winning chances" "higher World War 3 risk" "quicker end to the war" "more Ukrain. suffering/destruction" "more refugees"  "domestic econ. disadvantages", pattern(1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0) ///
prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span})) nobaselevel replace label 	stats(N r2, fmt("%12.0f" "%12.3f"))    cells(b(fmt(4)) p(fmt(4) par) ci(fmt(4) par)) p nostar ///
mtitles("anti-West." "pro-West." "anti-West." "pro-West." "anti-West." "pro-West." "anti-West." "pro-West." "anti-West." "pro-West." "anti-West." "pro-West." ) refcat(2.vign "air defense")


*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
*Supplementary Figures and Supplementary Table 4
*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

***************************************************************************************************
*** Supplementary Figure 6 : Correlation of anti-Western attitudes (PCA scores) and of components of PCA index with left-right position of respondents
***************************************************************************************************

	eststo clear
	foreach x in anti_west Q11 pro_russia anti_us  {
	reg `x' i.lr11 [aweight=W8], r
	eststo `x': margins lr11, post
	}
	coefplot anti_west Q11 pro_russia anti_us, label legend(order(2 "PCA score (high = anti-West)" 4 "Anti-NATO attitudes" 6 "Pro-Russian attitudes" 8 "Anti-US attitudes"  )) ylabel(1 2 3 4 5 6 7 8 9 10 11) ytitle(left(1)-right(11)-position)
	
	graph export "$fig\SupplFig6.eps", replace

***************************************************************************************************
*** Supplementary Table 4 : Regression of anti-west attitudes (PCA score) on socio-demographics (model 1), as well as political attitudes (model 2), as well as foreign policy values (PCA scores) (model 3) or pacifist attitudes (PCA scores) (model 4)
***************************************************************************************************

label variable iso "Isolationist att."
label variable mil "Militant interv. att."
label variable coop "Coop. int. att."
label variable pacifist "Att. war/peace 1"
label variable hawk "Att. war/peace 2"
label variable pol_interest4 "Political interest (1 low - 4 high)"
label variable Q1_1 "Personal state of econ. (1 good - 5 bad)" 
label variable Q1_2 "Country state of econ. (1 good - 5 bad)"
label variable anti_west "Anti-west att."

eststo clear
eststo: reg anti_west ib5.country i.agegroups i.male i.education i.employment  Q1_1 Q1_2 ib7.religion   [pweight=W8], r // i.work_sector 
sum anti_west if e(sample)
 mat sd=r(sd)
 mat mean=r(mean)
estadd scalar mean = mean[1,1] : est1
estadd scalar sd = sd[1,1] : est1

eststo: reg anti_west ib5.country i.agegroups i.male i.education i.employment  Q1_1 Q1_2 ib7.religion i.leftright3 i.voter pol_interest4   [pweight=W8], r 
sum anti_west if e(sample)
 mat sd=r(sd)
 mat mean=r(mean)
estadd scalar mean = mean[1,1] : est2
estadd scalar sd = sd[1,1] : est2

eststo: reg anti_west ib5.country i.agegroups i.male i.education i.employment  Q1_1 Q1_2 ib7.religion i.leftright3 i.voter pol_interest4 iso mil coop [pweight=W8], r 
sum anti_west if e(sample)
 mat sd=r(sd)
 mat mean=r(mean)
estadd scalar mean = mean[1,1] : est3
estadd scalar sd = sd[1,1] : est3

eststo: reg anti_west ib5.country i.agegroups i.male i.education i.employment  Q1_1 Q1_2 ib7.religion i.leftright3 i.voter pol_interest4 pacifist hawk [pweight=W8], r 
sum anti_west if e(sample)
 mat sd=r(sd)
 mat mean=r(mean)
estadd scalar mean = mean[1,1] : est4
estadd scalar sd = sd[1,1] : est4

esttab   using "$tab/SupplTab4.tex" ///
, p label order(5.country *country  1.agegroups *age* 0.male *male* 1.education *education* 1.employment *empl* Q1_1 Q1_2 7.religion *religion 1.leftright3 *left* 0.voter 1.voter pol_interest4) ///
coef(5.country "\textit{Country indicator (ref.: US)}" 1.agegroups "\textit{Age group indicator (ref.: 18-30)}" 0.male "\textit{Gender (ref.: female)}" 1.education "\textit{Education levle (ref.: low)}" 1.employment "\textit{Employment status (ref.: working)}" 7.religion "\textit{Religion (ref.: none)}" 1.leftright3 "\textit{Left-right positioning (ref.: left)}" 0.voter "\textit{Pol. participation (ref.: voter)}") /// 
replace nostar noomitted nobase stats(N r2 mean sd, fmt(0 2 2 2) ) cells(b(fmt(4)) p(fmt(4) par) ci(fmt(4) par))


***************************************************************************************************
*** Supplementary Figure 8 : Country heterogeneity in agreement with different support types
***************************************************************************************************


 eststo clear

 reg Q13n_1_1 i.vign  , r
eststo all: margins  i.vign  , post


foreach x in 1 2 3 4 5 {
local lab: label (country) `x' 
 reg Q13n_1_1 i.vign if country==`x', r
eststo `lab': margins  i.vign  , post
}


coefplot  all Germany Italy US France UK , base drop(_cons)  xlabel(2(1)6) label subtitle(support Ukraine with... (1 (disagree)/ 7 (agree))) legend(row(1)) xline(4)

 graph export "$fig\SupplFig8.eps", replace  

***************************************************************************************************
*** Supplementary Figure 9 : Vignette marginal means: Support by subgroups of pro-/anti-Western attitudes
***************************************************************************************************


 eststo clear

 reg Q13n_1_1 i.vign  , r
eststo all: margins  i.vign  , post

 reg Q13n_1_1 i.vign if antiwestern ==1, r
eststo strong_anti: margins  i.vign  , post

reg Q13n_1_1 i.vign if slight_antiwestern == 1, r
eststo anti: margins  i.vign  , post

reg Q13n_1_1 i.vign if slight_prowester==1 , r
eststo pro: margins  i.vign  , post

reg Q13n_1_1 i.vign if prowestern==1, r
eststo strong_pro: margins  i.vign  , post

coefplot  strong_anti anti pro strong_pro all , base drop(_cons)  xlabel(2(.5)6) label t2title(Support Ukraine with ... (1 (disagree)/ 7 (agree))) legend(row(3) symysize(vsmall) order(2 "Strong anti-Western attitudes (Qu. 1)" 4 "Anti-Western attitudes (Quartile 2)" 6 "Pro-Western attitudes (Quartile 3)" 8 "Strong pro-Western att. (Quartile 4)" 10 "Full sample") span) xline(4)

 graph export "$fig\SupplFig9.eps", replace 


***************************************************************************************************
*** Supplementary Figure 10 : Vignette marginal means: Perception of consequences by pro-/anti-Western attitudes (4 Quartiles)
***************************************************************************************************

eststo clear 

foreach y in 2 3 6 1 4 5 {
eststo model`y': reg q13_2_`y' i.vign , r
eststo overall`y': margins  i.vign  , post

foreach x in 1 2 3 4 {
eststo model`y'`x': reg q13_2_`y' i.vign if proantiwestgroups==`x', r
eststo overall`y'`x': margins  i.vign  , post
}
}

 *left panel
 coefplot  overall21 overall22 overall23 overall24 , bylabel("higher Ukrainian winning chance") || overall31 overall32 overall33 overall34  , bylabel("higher World War 3 risk") ||  overall61 overall62 overall63 overall64 , bylabel("quicker end to the war")   ///
 drop(_cons) xline(4, lpattern(solid))  byopts(style(compact) cols(1) )  xsize(1) ysize(1.5) xlabel(3(.5)5.5,  grid) ///
   grid( glstyle(minor_grid) glcolor(gray)) /// 
legend(size(small) region(lcolor(white)) row(2) order(2 "Strong pro−Western attitudes (Quartile 1) "  6 "Anti−Western attitudes (Quartile 3)"  ///
) cols(4))  base /// 
levels(95  ) /// 
name(one, replace) 

*right panel
coefplot  overall11 overall12 overall13 overall14 , bylabel("more Ukrain. suffering/destruction") ||  overall41 overall42 overall43 overall44  , bylabel("more refugees" ) || overall51 overall52 overall53 overall54 , bylabel("domestic economic disadvantages")    ///
 drop(_cons) xline(4, lpattern(solid))  byopts(style(compact) cols(1) )  xsize(1) ysize(1.5) xlabel(3(.5)5.5,  grid) ///
   grid( glstyle(minor_grid) glcolor(gray)) /// 
legend(size(small) region(lcolor(white)) row(2) order( 4 "Pro−Western attitudes (Quartile 2) " ///
8 "Strong anti−Western attitudes (Quartile 4)"  ) cols(4))  base /// 
levels(95  ) ///  
name(two, replace) 

*combine
graph combine one two, t2title("This support leads to... (1 (not at all) / 7 (certainly))", size(small))


 graph export "$fig\SupplFig10.pdf", replace 



*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
*END 
*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

